﻿<UserControl x:Class="SharePointExplorer.UserControls.DashboardItem"
             Tag="DashboardItem"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             xmlns:kinect="clr-namespace:SharePointExplorer.KinectControls"
             d:DesignHeight="700" d:DesignWidth="950" >
    <UserControl.Resources>
        <ItemsPanelTemplate x:Key="ItemsPanelTemplate">
            <WrapPanel Orientation="Horizontal" Height="700" Width="900" />
        </ItemsPanelTemplate>
    </UserControl.Resources>
    <Grid VerticalAlignment="Center" HorizontalAlignment="Center">
        <kinect:KinectListBox x:Name="DashboardDetailsList" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Background="Transparent" HorizontalAlignment="Center" ItemsPanel="{StaticResource ItemsPanelTemplate}" Style="{StaticResource ListBoxStyle}">
            <kinect:KinectListBox.ItemTemplate>
                <DataTemplate>
                    <kinect:KinectButton Width="175" Height="175" Margin="10"  BorderThickness="0" Style="{StaticResource KinectButtonStyle}" Click="KinectButton_Click" >
                        <Grid Background="Orange" Width="175" Height="175" Margin="5">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="20"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                                <Image Name="listImage" Source="../Images/FileExplorer.png" Grid.Row="1" Width="66" Height="66" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                            <TextBlock Name="listTitle" Text="{Binding Title}" Grid.Row="3" Foreground="White" Margin="10,5,5,5" FontSize="20" HorizontalAlignment="Left" TextWrapping="Wrap"></TextBlock>
                            </Grid>
                        </kinect:KinectButton>
                    
                </DataTemplate>
            </kinect:KinectListBox.ItemTemplate>
        </kinect:KinectListBox>
    </Grid>
</UserControl>
